package com.lagou.no2

class Game {
    //用户对象
    var user : User = _
    //电脑对象
    var computer : Computer = _
    //打印对战结果信息方法
    def show(): Unit ={
        println(s"${user.name} VS ${computer.name}")
        println(s"对战次数：${user.win + user.loss + user.peace}次")
        println("姓名\t得分\t胜局\t和局\t败局")
        println(s"${user.name}\t ${user.score}\t ${user.win}\t ${user.peace}\t ${user.loss}")
        println(s"${computer.name}\t ${computer.score}\t ${computer.win}\t ${computer.peace}\t ${computer.loss}")

    }
}
